<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>顾客详细信息</title>
<link rel="stylesheet" th:href="@{/plugin/layui/css/layui.css}" />
<script type="text/jscript" th:src="@{/plugin/layui/layui.js}" charset="UTF-8"></script>
<script type="text/jscript" th:src="@{/plugin/jquery.min.js}" charset="utf-8"></script>
<link rel="stylesheet" th:href="@{/src/ssj/css/customerShow.css}" media="all" />
</head>
<body>
	  <table class="layui-hide" id="customer"></table>
<script type="text/html" id="image">
    <img src="{{d.lshow}}" style="width: 32px; height: 32px;"/>
</script>
<script type="text/html" id="state">
    if(d.lstate==0){
        lstate="未领取";
    }else if(d.lstate==1){
        lstate="未领取";
}

</script>
<script type="text/javascript">         
layui.use('table', function(){
  var table = layui.table;
  
  table.render({
    elem: '#customer',
    url:'[[@{/customer/showCustomerDetail}]]',
    method: 'get',
    page:true,
    limit:10,
    cols: [
    	[
      {field:'cid',width:120,align : 'center',title: '顾客编号' ,sort:true},
      {field:'ctel',width:120,align : 'center',title: '顾客电话',sort: true},
      {field:'cname',width:120,align : 'center',title: '顾客名字'},
      {field:'cctime',width:200,align : 'center',title: '创建时间'},
      {field:'ctotal',width:120,align : 'center',title: '消费总额',sort: true} ,
      {field:'lpname',width:120,align : 'center',title: '赠品名称' },
      {field:'lshow',width:120,align : 'center',title:  'logo展示 ' ,templet:'#image',sort: true},
      {field:'lstate',width:120,align : 'center',title: '赠品状态' ,templet:function(rec){
    	  if(rec.lstate=='0'){
    		  return "未领取";
    	  }else{
    		  return "已领取";
    	  }
      }},
      {field:'tname',width:120,align : 'center',title: '顾客类型 ' }
    ]
    	]
  });
});
</script>  
</body>
</html>
